package com.jishaokang.service;

import com.jishaokang.base.Result;
import com.jishaokang.model.dto.User;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.security.NoSuchAlgorithmException;
import java.text.ParseException;

/**
 * Created by NANA_Final on 2019/6/21.
 */
public interface UserService {
    Result login(User user) throws NoSuchAlgorithmException;

    Result addUser(User user) throws NoSuchAlgorithmException;

    Result sendVerification(User user) throws IOException;

    Result loginByVerification(String phone, String verification) throws NoSuchAlgorithmException;

    Result getUserCurrent(User user);

    Result selectUserByUsername(User user);

    Result logout(User user);

    Result selectUserByUserId(User user);

    Result updateUserPassword(String token, String oldPassword, String password) throws NoSuchAlgorithmException;

    Result updateUser(User user);

    Result updateUserImage(String token, MultipartFile imageFile, HttpServletRequest request) throws IOException;

    Result selectUserByForbid(User user);

    Result selectUser(User user);

    Result updateUserPower(User user) throws ParseException;

    Result selectUserByUsernameVague(User user);

    Result selectExaminer(User user);

    Result addExaminer(User user);

    Result deleteExaminer(User user);

    Result updatePhone(String token,String phone, String verification);
}